import { PLATFORM_ID } from "@/utils/enum.js";
const isOnline =
  location.hostname.indexOf(".ulearning.cn") !== -1 ||
  location.hostname.indexOf(".moocpeople.cn") !== -1;
const domain = isOnline ? "ulearning" : "tongshike";

// 各平台host
const PLATFORM_API = {
  [PLATFORM_ID.ZYK]: `https://zykapi.${domain}.cn`,
  [PLATFORM_ID.RM]: `https://zykapi.${domain}.cn`,
  [PLATFORM_ID.VR]: `https://vrapi.${domain}.cn`,
  [PLATFORM_ID.SJJX]: `https://sjjxapi.${domain}.cn`,
  [PLATFORM_ID.BK]: `https://vrapi.${domain}.cn`
};

// 思政公共host
const SZ_ACCOUNT_HOST = `https://szaccountapi.${domain}.cn`;
// 优学院公共host
const COURSE_API_HOST = `https://courseapi.${domain}.cn`;
// gkkapi
const GKK_API_HOST = `https://gkkapi.${domain}.cn`;

export {
  SZ_ACCOUNT_HOST,
  COURSE_API_HOST,
  GKK_API_HOST,
  PLATFORM_API
};
